package com.zyl.blog.service;

import com.zyl.blog.pojo.Blog;
import com.zyl.blog.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 * @author 14323
 * @date 2020/8/9 10:13
 */
public interface BlogService {

    Blog getBlog(Long id);

    Blog getAndConvert(Long id);

    Page<Blog> getBlogPage(Pageable pageable, BlogQuery blogQuery);

    Page<Blog> getBlogPage(Pageable pageable);

    Page<Blog> getBlogPage(Long tagId, Pageable pageable);

    Page<Blog> getSearchBlogPage(String query, Pageable pageable);

    Page<Blog> getTopBlog(Integer size);

    Map<String,List<Blog>> archiveBlog();

    Long countBlog();

    Blog saveBlog(Blog blog);

    Blog updateBlog(Long id, Blog blog);

    void deleteBlog(Long id);
}
